import platform = require('../../../../../platform/common/baseCommon');
import appClient = require('../../../../../platform/client/appClient');
import navbarMainForm = require('../../../../../platform/client/mainForm/navbarMainForm');

/** 应用程序配置 */
export let defaultObject = new appClient.clientApplication();

let mainForm = new navbarMainForm.navbarMainForm();

syncRequire('./platform/client/controls');
mainForm.navPages = [
    {
        $type: "platform.client.tabPage",
        id: "echartTest",
        title: "EChart测试",
        icon: "home",
        iconClass: "glyphicon glyphicon-home",
        view: new platform.lazyFactory("project/test/config/client/smartReportApp/echartTestConfig", "defaultObject"),
        viewStack: new appClient.viewStack()
    },
    {
        $type: "platform.client.tabPage",
        title: "首页",
        icon: "home",
        iconClass: "glyphicon glyphicon-home",
        view: new platform.lazyFactory("project/test/config/client/mobileapp/homeViewConfig", "defaultObject"),
        viewStack: new appClient.viewStack()
    },
    {
        $type: "platform.client.tabPage",
        title: "贷款",
        icon: "usd",
        iconClass: "glyphicon glyphicon-usd",
        view: new platform.lazyFactory("project/test/config/client/mobileapp/testViewConfig", "defaultObject"),
        viewStack: new appClient.viewStack()
    },
    {
        $type: "platform.client.tabPage",
        title: "我",
        icon: "user",
        iconClass: "glyphicon glyphicon-user",
        view: new platform.lazyFactory("project/test/config/client/mobileapp/aboutViewConfig", "defaultObject"),
        viewStack: new appClient.viewStack()
    },
    {
        $type: "platform.client.tabPage",
        title: "我的",
        icon: "user",
        iconClass: "glyphicon glyphicon-user",
        view: new platform.lazyFactory("project/test/config/client/mobileapp/userinfo/userInfoViewConfig", "defaultObject"),
        viewStack: new appClient.viewStack()
    }
];
platform.fetchAddonProtoType(mainForm);
defaultObject.mainForm = mainForm;

defaultObject.serverLogger = new appClient.remoteFactory(platform.baseLogger, "remoteCall", "fileLogService");